package homework12月4号;

import java.util.Scanner;

public class H2 {
    public static void main(String[] args) throws Exception {
     run();
    }

    private static void run() throws Exception {
        int a=0;
        int b=0;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入第一个数");
        String str1 = sc.next();
        try {
            int ab = Integer.parseInt(str1);
            a=ab;
        } catch (Exception e) {
            throw new Exception("输入类型错误！！！");
        }
        System.out.println("请输入第二个数");
        String str2 = sc.next();
        try {
            int ab = Integer.parseInt(str2);
            b=ab;
        } catch (Exception e) {
            throw new Exception("输入类型错误！！！");
        }
        System.out.println(a+b);
    }
}
